﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using GSLMS.Services.Interface;
using GSLMS.Entity;
using GSLMS.Entity.DTO;
using GSLMS.DAL;
namespace GSLMS.Services
{
    /// <summary>
    /// 此层为服务层，已经继承了父类BaseService,已经定义好方法请查看BaseService类；若需要自定义方法请在此层增加并在数据层及接口层定义相关的方法
    /// </summary>
    public partial class SAPP_PROINFO : BaseService<TB_APP_PROINFO>, IAPP_PROINFO
    {
        private static readonly GSLMS.DAL.Oracle.APP_PROINFO dal = new GSLMS.DAL.Oracle.APP_PROINFO();
        public override BaseDAL<TB_APP_PROINFO> DAL
        {
            get { return dal; }
        }

        /// <summary>
        ///通过申请记录ID，提取立项申请中共有的信息，用于转立项申请功能
        /// </summary>
        /// <param name="regInfoID"></param>
        /// <returns></returns>
        public GSLMS.Entity.TB_APP_PROINFO GetByRegInfoID(long regInfoID)
        {
            return dal.GetByRegInfoID(regInfoID) ?? new TB_APP_PROINFO();
        }

        /// <summary>
        /// 通过立项申请记录ID，提取提交页面所需的信息，用于提交页面
        /// </summary>
        /// <param name="proInfoID">立项申请记录ID</param>
        /// <returns></returns>
        public GSLMS.Entity.TB_APP_PROINFO GetSubmiShow(long proInfoID)
        {
            return dal.GetSubmiShow(proInfoID) ?? new TB_APP_PROINFO();
        }

        /// <summary>
        /// 提交立项申请,实体中传入ID及submitby
        /// </summary>
        /// <param name="TB_APP_PROINFO"></param>
        /// <returns></returns>
        public bool SubmitPro(GSLMS.Entity.TB_APP_PROINFO model)
        {
            return dal.SubmitPro(model);
        }

        /// <summary>
        /// 取消立项申请,实体中传入ID及cancelBy、cancelreason
        /// </summary>
        /// <param name="TB_APP_PROINFO"></param>
        /// <returns></returns>
        public bool CancelPro(GSLMS.Entity.TB_APP_PROINFO model)
        {
            return dal.CancelPro(model);
        }

        /// <summary>
        /// 提取非赎楼信息的调查报告信息
        /// </summary>
        /// <param name="proID">立项申请记录ID</param>
        /// <returns></returns>
        public GSLMS.Entity.TB_APP_PROINFO GetProReportInfo(long proID)
        {
            return dal.GetProReportInfo(proID);
        }

        /// <summary>
        /// 新增调查报告信息
        /// </summary>
        /// <param name="model"></param>
        /// <returns></returns>
        public bool AddProReportInfo(GSLMS.Entity.TB_APP_PROINFO model)
        {
            return dal.AddProReportInfo(model);
        }

        /// <summary>
        /// 分页提取风控分配数据
        /// </summary>
        public List<GSLMS.Entity.TB_APP_PROINFO> GetAduAssignList(GSLMS.Entity.TB_APP_PROINFO searchParam)
        {
            return dal.GetAduAssignList(searchParam);
        }

        /// <summary>
		/// 得到一个风控分配的实体
		/// </summary>
        public GSLMS.Entity.TB_APP_PROINFO GetAduAssignByID(long ID)
        {
            return dal.GetAduAssignByID(ID);
        }
        /// <summary>
        /// 分页提取风控审批数据
        /// </summary>
        public List<GSLMS.Entity.TB_APP_PROINFO> GetAduRiskList(GSLMS.Entity.TB_APP_PROINFO searchParam)
        {
            return dal.GetAduRiskList(searchParam);
        }

        /// <summary>
        /// 提取非赎楼信息的风控调查报告信息
        /// </summary>
        /// <param name="proID">立项申请记录ID</param>
        /// <returns></returns>
        public GSLMS.Entity.TB_APP_PROINFO GetProRiskControlReportInfo(long proID)
        {
            return dal.GetProRiskControlReportInfo(proID);
        }

        /// <summary>
        /// 新增风控审批信息
        /// </summary>
        /// <param name="?"></param>
        /// <returns></returns>
        public bool AddProRiskControlReportInfo(GSLMS.Entity.TB_APP_PROINFO model)
        {
            return dal.AddProRiskControlReportInfo(model);
        }

        /// <summary>
        /// 审批退回
        /// </summary>
        /// <param name="model"></param>
        /// <returns></returns>
        public bool AduitBackTo(GSLMS.Entity.TB_APP_PROINFO model)
        {
            return dal.AduitBackTo(model);
        }
    }
}
